{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using TensorFlow backend.\n"
     ]
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import pickle\n",
    "import keras.backend as K\n",
    "from keras.layers import Dense, Input\n",
    "from keras.models import Model\n",
    "from scipy.ndimage import gaussian_filter\n",
    "from glob import glob\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib.patches as patches"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "sess = K.tf.Session(config=K.tf.ConfigProto(allow_soft_placement=False,\n",
    "                                                       gpu_options=K.tf.GPUOptions(allow_growth=True),\n",
    "                                                       log_device_placement=False))\n",
    "K.set_session(sess)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "log_pca_files = sorted(glob(\"/glade/work/dgagne/spatial_storm_results_20171220/hail_logistic_pca_sample_*.pkl\"))\n",
    "log_mean_files = sorted(glob(\"/glade/work/dgagne/spatial_storm_results_20171220/hail_logistic_mean_sample_*.pkl\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "label_spots_t = [(2, 2),\n",
    "               (10, 10), (10, 26), \n",
    "               (20, 10), (20, 26)]\n",
    "label_spots_d = [\n",
    "               (5, 10), (5, 22), \n",
    "               (18, 12), (18, 28),\n",
    "               (28, 28)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/glade/u/apps/dav/opt/python/3.6.4/intel/17.0.1/pkg-library/20180801-DL/lib/python3.6/site-packages/sklearn/base.py:311: UserWarning: Trying to unpickle estimator PCA from version 0.19.1 when using version 0.19.2. This might lead to breaking code or invalid results. Use at your own risk.\n",
      "  UserWarning)\n",
      "/glade/u/apps/dav/opt/python/3.6.4/intel/17.0.1/pkg-library/20180801-DL/lib/python3.6/site-packages/sklearn/base.py:311: UserWarning: Trying to unpickle estimator LogisticRegression from version 0.19.1 when using version 0.19.2. This might lead to breaking code or invalid results. Use at your own risk.\n",
      "  UserWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.811726\n",
      "0.60253894\n",
      "0.32432315\n",
      "0.112430505\n",
      "0.026028171\n",
      "0.004670861\n",
      "0.0007405331\n",
      "0.00011140738\n",
      "1.6414706e-05\n",
      "2.3990485e-06\n",
      "1\n",
      "0.7956542\n",
      "0.5912344\n",
      "0.32806012\n",
      "0.12299678\n",
      "0.031943563\n",
      "0.006498314\n",
      "0.0011642411\n",
      "0.00019693233\n",
      "3.2509623e-05\n",
      "5.3134413e-06\n",
      "2\n",
      "0.82901067\n",
      "0.61857045\n",
      "0.3266377\n",
      "0.10606852\n",
      "0.022157073\n",
      "0.0035466412\n",
      "0.0005024635\n",
      "6.780406e-05\n",
      "8.98404e-06\n",
      "1.1824978e-06\n",
      "3\n",
      "0.8155643\n",
      "0.58706695\n",
      "0.28669482\n",
      "0.08319363\n",
      "0.015567772\n",
      "0.0022793734\n",
      "0.00030022734\n",
      "3.7983315e-05\n",
      "4.7356966e-06\n",
      "5.873636e-07\n",
      "4\n",
      "0.8090329\n",
      "0.6121765\n",
      "0.34935158\n",
      "0.13502984\n",
      "0.035834126\n",
      "0.007361639\n",
      "0.001321436\n",
      "0.00022307785\n",
      "3.669115e-05\n",
      "5.970946e-06\n",
      "5\n",
      "0.820409\n",
      "0.62160677\n",
      "0.34921822\n",
      "0.12888743\n",
      "0.03182698\n",
      "0.0060289223\n",
      "0.0009988914\n",
      "0.00015612009\n",
      "2.3829052e-05\n",
      "3.6028214e-06\n",
      "6\n",
      "0.8196742\n",
      "0.60181904\n",
      "0.3089128\n",
      "0.09705811\n",
      "0.019779917\n",
      "0.003122682\n",
      "0.00043921304\n",
      "5.901626e-05\n",
      "7.795601e-06\n",
      "1.0232342e-06\n",
      "7\n",
      "0.7977882\n",
      "0.5701551\n",
      "0.2830053\n",
      "0.0872099\n",
      "0.017909626\n",
      "0.002904439\n",
      "0.00042308975\n",
      "5.9032744e-05\n",
      "8.102445e-06\n",
      "1.1053711e-06\n",
      "8\n",
      "0.7877181\n",
      "0.5714335\n",
      "0.3010141\n",
      "0.10431877\n",
      "0.024871508\n",
      "0.0046859044\n",
      "0.0007857799\n",
      "0.00012526406\n",
      "1.9559962e-05\n",
      "3.0289784e-06\n",
      "9\n",
      "0.83310115\n",
      "0.6068149\n",
      "0.29470646\n",
      "0.08167147\n",
      "0.014114186\n",
      "0.001888099\n",
      "0.00022726005\n",
      "2.6323556e-05\n",
      "3.00868e-06\n",
      "3.4231766e-07\n",
      "10\n",
      "0.8002721\n",
      "0.5861882\n",
      "0.31030324\n",
      "0.10640846\n",
      "0.0246786\n",
      "0.0044814916\n",
      "0.0007224108\n",
      "0.000110688816\n",
      "1.661867e-05\n",
      "2.475349e-06\n",
      "11\n",
      "0.7923835\n",
      "0.5789633\n",
      "0.30855644\n",
      "0.108353704\n",
      "0.026099958\n",
      "0.0049477713\n",
      "0.0008325299\n",
      "0.00013299272\n",
      "2.079626e-05\n",
      "3.2247856e-06\n",
      "12\n",
      "0.8158099\n",
      "0.6241436\n",
      "0.36322054\n",
      "0.1439934\n",
      "0.039113753\n",
      "0.008172545\n",
      "0.0014840872\n",
      "0.0002526892\n",
      "4.1859672e-05\n",
      "6.8564987e-06\n",
      "13\n",
      "0.8243723\n",
      "0.6095503\n",
      "0.31634188\n",
      "0.10046011\n",
      "0.020586306\n",
      "0.0032517095\n",
      "0.0004564117\n",
      "6.1137645e-05\n",
      "8.047905e-06\n",
      "1.0525018e-06\n",
      "14\n",
      "0.8000951\n",
      "0.5850034\n",
      "0.3082252\n",
      "0.1048644\n",
      "0.024098791\n",
      "0.004338651\n",
      "0.0006940064\n",
      "0.00010558311\n",
      "1.5744556e-05\n",
      "2.32958e-06\n",
      "15\n",
      "0.77741855\n",
      "0.5604455\n",
      "0.29523864\n",
      "0.103828125\n",
      "0.025480442\n",
      "0.004975582\n",
      "0.0008660741\n",
      "0.00014327194\n",
      "2.3203002e-05\n",
      "3.7255838e-06\n",
      "16\n",
      "0.78865707\n",
      "0.57789105\n",
      "0.31227177\n",
      "0.112915926\n",
      "0.028292028\n",
      "0.005588677\n",
      "0.0009780718\n",
      "0.00016218348\n",
      "2.6293594e-05\n",
      "4.2234706e-06\n",
      "17\n",
      "0.8371116\n",
      "0.6381844\n",
      "0.35353002\n",
      "0.123413816\n",
      "0.027771167\n",
      "0.0047283773\n",
      "0.00070450036\n",
      "9.9357116e-05\n",
      "1.37197e-05\n",
      "1.8793855e-06\n",
      "18\n",
      "0.81267405\n",
      "0.61294925\n",
      "0.34457335\n",
      "0.1289111\n",
      "0.032704405\n",
      "0.0064069037\n",
      "0.0010991805\n",
      "0.00017780445\n",
      "2.8069631e-05\n",
      "4.3879595e-06\n",
      "19\n",
      "0.8036004\n",
      "0.5911374\n",
      "0.31478584\n",
      "0.108498156\n",
      "0.02521076\n",
      "0.0045732916\n",
      "0.00073528074\n",
      "0.000112296206\n",
      "1.6800428e-05\n",
      "2.493387e-06\n",
      "20\n",
      "0.8021768\n",
      "0.5879937\n",
      "0.31080472\n",
      "0.10598898\n",
      "0.024360802\n",
      "0.004378616\n",
      "0.0006986368\n",
      "0.00010598403\n",
      "1.5757802e-05\n",
      "2.3244882e-06\n",
      "21\n",
      "0.8164583\n",
      "0.6083106\n",
      "0.3280212\n",
      "0.11317304\n",
      "0.025884187\n",
      "0.0045712283\n",
      "0.0007124964\n",
      "0.000105382314\n",
      "1.526764e-05\n",
      "2.1944104e-06\n",
      "22\n",
      "0.80544424\n",
      "0.613295\n",
      "0.3580369\n",
      "0.14490667\n",
      "0.04091835\n",
      "0.008969712\n",
      "0.0017118991\n",
      "0.00030607838\n",
      "5.3185035e-05\n",
      "9.130774e-06\n",
      "23\n",
      "0.8191441\n",
      "0.5860413\n",
      "0.27867284\n",
      "0.076675944\n",
      "0.013442506\n",
      "0.0018475943\n",
      "0.00022949031\n",
      "2.746034e-05\n",
      "3.243007e-06\n",
      "3.8131134e-07\n",
      "24\n",
      "0.80901223\n",
      "0.6078953\n",
      "0.3402639\n",
      "0.12703545\n",
      "0.032296743\n",
      "0.006361184\n",
      "0.0010988999\n",
      "0.00017907839\n",
      "2.8484841e-05\n",
      "4.486645e-06\n",
      "25\n",
      "0.79813635\n",
      "0.58595675\n",
      "0.31331065\n",
      "0.10969894\n",
      "0.026149938\n",
      "0.0048844153\n",
      "0.0008086234\n",
      "0.00012706232\n",
      "1.9546784e-05\n",
      "2.982065e-06\n",
      "26\n",
      "0.8216433\n",
      "0.61912644\n",
      "0.34157595\n",
      "0.12172428\n",
      "0.028743807\n",
      "0.005208159\n",
      "0.0008283595\n",
      "0.00012464309\n",
      "1.8345207e-05\n",
      "2.6771738e-06\n",
      "27\n",
      "0.81509465\n",
      "0.60957325\n",
      "0.3331003\n",
      "0.11796745\n",
      "0.027896903\n",
      "0.005093567\n",
      "0.00081878057\n",
      "0.00012464575\n",
      "1.8566441e-05\n",
      "2.742125e-06\n",
      "28\n",
      "0.8270459\n",
      "0.6121644\n",
      "0.3168574\n",
      "0.09962942\n",
      "0.020097738\n",
      "0.003119825\n",
      "0.00043048768\n",
      "5.6717563e-05\n",
      "7.345956e-06\n",
      "9.4554264e-07\n",
      "29\n",
      "0.8418855\n",
      "0.627809\n",
      "0.32126033\n",
      "0.09591539\n",
      "0.017777076\n",
      "0.0025109565\n",
      "0.00031569\n",
      "3.8000948e-05\n",
      "4.504591e-06\n",
      "5.3112905e-07\n"
     ]
    }
   ],
   "source": [
    "samples = np.arange(0, 30)\n",
    "for sample in samples:\n",
    "    print(sample)\n",
    "    with open(log_pca_files[sample], \"rb\") as pca_file:\n",
    "        log_pca_obj = pickle.load(pca_file)\n",
    "    k_log_input = Input((75,))\n",
    "    k_log_out = Dense(1, activation=\"sigmoid\")(k_log_input)\n",
    "    k_mod = Model(k_log_input, k_log_out)\n",
    "    k_mod.compile(\"sgd\", loss=\"mse\")\n",
    "    k_mod.layers[1].set_weights([log_pca_obj.model.coef_.T, log_pca_obj.model.intercept_])\n",
    "    loss = K.mean((k_mod.output - 1) ** 2)\n",
    "    grad = K.gradients(loss, [k_mod.input])[0]\n",
    "    grad /= K.maximum(K.std(grad), K.epsilon())\n",
    "    grad_func = K.function([k_mod.input], [grad, loss])\n",
    "    input_vals = np.zeros((1, 75))\n",
    "    for i in range(10):\n",
    "        g_val, l_val = grad_func([input_vals])\n",
    "        print(l_val)\n",
    "        input_vals -= 0.1 * g_val\n",
    "    layer_vis = np.zeros((1, 32, 32, 15))\n",
    "    for v in range(15):\n",
    "        layer_vis[0, :, :, v] = log_pca_obj.pca[v].inverse_transform(input_vals[:, v * 5:(v+1)*5]).reshape(32, 32)\n",
    "    fig = plt.figure(figsize=(12, 4))\n",
    "    heights = [500, 700, 850]\n",
    "    for a in np.arange(3):\n",
    "        plt.subplot(1,3, a + 1)\n",
    "        hght_g = gaussian_filter(layer_vis[0, :, :, a], 1)\n",
    "        hght_g /= hght_g.std()\n",
    "        hght = plt.contourf(np.arange(0, 32) + 0.5, np.arange(0, 32) + 0.5, hght_g, [-3, -2, -1, 1, 2, 3], extend=\"both\", cmap=\"RdBu_r\", zorder=0)\n",
    "        tmpc_g = gaussian_filter(layer_vis[0, :, :, 3 + a], 1)\n",
    "        tmpc_g /= tmpc_g.std()\n",
    "        tmpc = plt.contour(np.arange(0, 32) + 0.5, np.arange(0, 32) + 0.5, tmpc_g, \n",
    "                           [-3, -2, -1, 1, 2, 3], linewidths=3, colors=[\"orangered\"], zorder=0.1)\n",
    "        if np.abs(tmpc_g).max() > 1: \n",
    "            plt.clabel(tmpc, fmt=\"%1.0f\", fontsize=12, manual=label_spots_t)\n",
    "        dewp_g = gaussian_filter(layer_vis[0, :, :, 6 + a], 1)\n",
    "        dewp_g /= dewp_g.std()\n",
    "        dewp = plt.contour(np.arange(0, 32) + 0.5, np.arange(0, 32) + 0.5,\n",
    "                           dewp_g, [-3, -2, -1,1,2,3], linewidths=2, colors=[\"purple\"], zorder=0.1)\n",
    "        if np.abs(dewp_g).max() > 1:\n",
    "            plt.clabel(dewp, fmt=\"%1.0f\", fontsize=12, manual=label_spots_d)\n",
    "        u_g = gaussian_filter(layer_vis[0, :, :, 9 + a], 1)\n",
    "        u_g /= u_g.std()\n",
    "        v_g = gaussian_filter(layer_vis[0, :, :, 12 + a], 1)\n",
    "        v_g /= v_g.std()\n",
    "        wind_mask = np.sqrt(u_g ** 2 + v_g ** 2) < 0.5\n",
    "        u_g[wind_mask] = 0\n",
    "        v_g[wind_mask] = 0\n",
    "        qv = plt.quiver(np.arange(0, 32, 2) + 0.5, np.arange(0, 32, 2) + 0.5, u_g[::2, ::2],\n",
    "                        v_g[::2, ::2], color=\"k\", scale=64)\n",
    "        plt.xticks(np.arange(0, 36, 8), np.arange(0, 36, 8) * 3)\n",
    "        plt.yticks(np.arange(0, 36, 8), np.arange(0, 36, 8) * 3)\n",
    "        plt.xlabel(\"West-East Distance (km)\", fontsize=12)\n",
    "        plt.ylabel(\"South-North Distance (km)\", fontsize=12)\n",
    "        plt.title(\"{0:d} hPa\".format(heights[a]), fontsize=14)\n",
    "        rect = patches.Rectangle((18, 0), 14, 6, facecolor='white', edgecolor='k', alpha=0.9, zorder=1)\n",
    "        plt.gca().add_patch(rect)\n",
    "        plt.text(19, 5, \"Temperature\", color='orangered', fontsize=10, fontweight=\"bold\", ha=\"left\", va=\"center\", zorder=3)\n",
    "        plt.text(19, 3, \"Dewpoint\", color=\"purple\", fontsize=10, fontweight=\"bold\", ha=\"left\", va=\"center\", zorder=3)\n",
    "        plt.quiverkey(qv, 20, 1, 3, 'Wind (3 $\\sigma$)', coordinates='data', labelpos='E')\n",
    "        \n",
    "    cax = fig.add_axes([0.91, 0.1, 0.02, 0.8])\n",
    "    fig.colorbar(hght, cax=cax, label=\"Geopotential Height Anomaly\")\n",
    "    plt.suptitle(\"Logistic PCA Optimized Hailstorm Model {0:02d}\".format(sample), fontsize=16, y=0.99)\n",
    "    plt.savefig(\"./logistic_pca_best_hailstorm_{0:02d}.pdf\".format(sample), bbox_inches=\"tight\", dpi=300)\n",
    "    plt.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "0.7484292\n",
      "0.0016412579\n",
      "7.724868e-08\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "1\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/glade/u/apps/dav/opt/python/3.6.4/intel/17.0.1/pkg-library/20180801-DL/lib/python3.6/site-packages/sklearn/base.py:311: UserWarning: Trying to unpickle estimator LogisticRegression from version 0.19.1 when using version 0.19.2. This might lead to breaking code or invalid results. Use at your own risk.\n",
      "  UserWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7401594\n",
      "0.003201533\n",
      "3.4064578e-07\n",
      "3.274181e-11\n",
      "3.1391778e-11\n",
      "3.1391778e-11\n",
      "3.0070165e-11\n",
      "3.0070165e-11\n",
      "3.0070165e-11\n",
      "2.8776979e-11\n",
      "2\n",
      "0.7459781\n",
      "0.001266427\n",
      "4.6171156e-08\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "3\n",
      "0.74567807\n",
      "0.0014877497\n",
      "6.468528e-08\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.4016347e-12\n",
      "2.4016347e-12\n",
      "2.4016347e-12\n",
      "2.4016347e-12\n",
      "4\n",
      "0.7408322\n",
      "0.0012734918\n",
      "4.9084605e-08\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "5\n",
      "0.74566704\n",
      "0.0016055999\n",
      "7.5797715e-08\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "6\n",
      "0.75352514\n",
      "0.0012622941\n",
      "4.2507082e-08\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "7\n",
      "0.7380528\n",
      "0.001810013\n",
      "1.047514e-07\n",
      "5.684342e-12\n",
      "5.684342e-12\n",
      "5.684342e-12\n",
      "5.684342e-12\n",
      "5.684342e-12\n",
      "5.684342e-12\n",
      "5.684342e-12\n",
      "8\n",
      "0.75918484\n",
      "0.0018819141\n",
      "9.2188785e-08\n",
      "4.106937e-12\n",
      "4.106937e-12\n",
      "4.106937e-12\n",
      "4.106937e-12\n",
      "4.106937e-12\n",
      "4.106937e-12\n",
      "4.106937e-12\n",
      "9\n",
      "0.75990075\n",
      "0.002395217\n",
      "1.5172297e-07\n",
      "8.881784e-12\n",
      "8.881784e-12\n",
      "8.881784e-12\n",
      "8.881784e-12\n",
      "8.185452e-12\n",
      "8.185452e-12\n",
      "8.185452e-12\n",
      "10\n",
      "0.76347065\n",
      "0.0009859503\n",
      "2.3065295e-08\n",
      "5.1159077e-13\n",
      "5.1159077e-13\n",
      "5.1159077e-13\n",
      "5.1159077e-13\n",
      "5.1159077e-13\n",
      "5.1159077e-13\n",
      "5.1159077e-13\n",
      "11\n",
      "0.7529228\n",
      "0.0010454279\n",
      "2.8978548e-08\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "12\n",
      "0.7373682\n",
      "0.0012644466\n",
      "4.9986685e-08\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "1.7195133e-12\n",
      "13\n",
      "0.75431854\n",
      "0.0004249013\n",
      "4.5044004e-09\n",
      "8.645884e-11\n",
      "7.993606e-11\n",
      "7.572964e-11\n",
      "6.963319e-11\n",
      "6.571099e-11\n",
      "6.190248e-11\n",
      "6.004086e-11\n",
      "14\n",
      "0.75945026\n",
      "0.0013786455\n",
      "4.8086125e-08\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "15\n",
      "0.74128205\n",
      "0.0011981349\n",
      "4.3049514e-08\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "16\n",
      "0.7377036\n",
      "0.0020401143\n",
      "1.3507258e-07\n",
      "8.185452e-12\n",
      "8.185452e-12\n",
      "8.185452e-12\n",
      "8.185452e-12\n",
      "8.185452e-12\n",
      "8.185452e-12\n",
      "8.185452e-12\n",
      "17\n",
      "0.7573606\n",
      "0.001651372\n",
      "7.152738e-08\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "18\n",
      "0.75792706\n",
      "0.001674487\n",
      "7.319486e-08\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "2.7853275e-12\n",
      "19\n",
      "0.75524294\n",
      "0.0018676836\n",
      "9.4446534e-08\n",
      "4.604317e-12\n",
      "4.604317e-12\n",
      "4.106937e-12\n",
      "4.106937e-12\n",
      "4.106937e-12\n",
      "4.106937e-12\n",
      "4.106937e-12\n",
      "20\n",
      "0.7424562\n",
      "0.0010432318\n",
      "3.195311e-08\n",
      "9.094948e-13\n",
      "9.094948e-13\n",
      "9.094948e-13\n",
      "9.094948e-13\n",
      "9.094948e-13\n",
      "9.094948e-13\n",
      "9.094948e-13\n",
      "21\n",
      "0.74202055\n",
      "0.0024032868\n",
      "1.8269205e-07\n",
      "1.2789768e-11\n",
      "1.2789768e-11\n",
      "1.2789768e-11\n",
      "1.195133e-11\n",
      "1.195133e-11\n",
      "1.195133e-11\n",
      "1.195133e-11\n",
      "22\n",
      "0.7523932\n",
      "0.0012696573\n",
      "4.354561e-08\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "1.4210854e-12\n",
      "23\n",
      "0.7509635\n",
      "0.0010088817\n",
      "2.7456792e-08\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "6.963319e-13\n",
      "24\n",
      "0.74710417\n",
      "0.0021220807\n",
      "1.3384864e-07\n",
      "7.517541e-12\n",
      "7.517541e-12\n",
      "7.517541e-12\n",
      "7.517541e-12\n",
      "7.517541e-12\n",
      "7.517541e-12\n",
      "7.517541e-12\n",
      "25\n",
      "0.7522901\n",
      "0.0007994797\n",
      "1.6760225e-08\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "26\n",
      "0.7513965\n",
      "0.0014856674\n",
      "6.092151e-08\n",
      "2.4016347e-12\n",
      "2.4016347e-12\n",
      "2.4016347e-12\n",
      "2.4016347e-12\n",
      "2.4016347e-12\n",
      "2.4016347e-12\n",
      "2.4016347e-12\n",
      "27\n",
      "0.74771696\n",
      "0.0007418475\n",
      "1.5047036e-08\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "3.5527137e-13\n",
      "28\n",
      "0.74765074\n",
      "0.001640891\n",
      "7.77797e-08\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "3.1974423e-12\n",
      "29\n",
      "0.7524769\n",
      "0.0042550243\n",
      "5.5289325e-07\n",
      "6.379253e-11\n",
      "6.004086e-11\n",
      "5.8207657e-11\n",
      "5.6402886e-11\n",
      "5.4626522e-11\n",
      "5.287859e-11\n",
      "5.287859e-11\n"
     ]
    }
   ],
   "source": [
    "samples = np.arange(0, 30)\n",
    "log_mean_grad_vals = np.zeros((30, 15))\n",
    "for sample in samples:\n",
    "    print(sample)\n",
    "    with open(log_mean_files[sample], \"rb\") as pca_file:\n",
    "        log_mean_obj = pickle.load(pca_file)\n",
    "    k_log_input = Input((15,))\n",
    "    k_log_out = Dense(1, activation=\"sigmoid\")(k_log_input)\n",
    "    k_mod = Model(k_log_input, k_log_out)\n",
    "    k_mod.compile(\"sgd\", loss=\"mse\")\n",
    "    k_mod.layers[1].set_weights([log_mean_obj.coef_.T, log_mean_obj.intercept_])\n",
    "    loss = K.mean((k_mod.output - 1) ** 2)\n",
    "    grad = K.gradients(loss, [k_mod.input])[0]\n",
    "    grad /= K.maximum(K.std(grad), K.epsilon())\n",
    "    grad_func = K.function([k_mod.input], [grad, loss])\n",
    "    input_vals = np.zeros((1, 15))\n",
    "    for i in range(10):\n",
    "        g_val, l_val = grad_func([input_vals])\n",
    "        print(l_val)\n",
    "        input_vals -= 0.1 * g_val\n",
    "    log_mean_grad_vals[sample] = input_vals"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "input_vars = [\"Height\", \"Temperature\", \"Dewpoint\", \"U-Wind\", \"V-Wind\"]\n",
    "levels = [\"500 hPa\", \"700 hPa\", \"850 hPa\"]\n",
    "all_input_vars = []\n",
    "for iv in input_vars:\n",
    "    for lev in levels:\n",
    "        all_input_vars.append(iv + \" \" + lev)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeoAAAFSCAYAAAA99JwiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzsnXW4HOX1xz/fhAhuISF4sUAagkOKBneH4kULxX5o0SJFWihePHgppZTiVqxQ3DUQvLikOARLwvn9cd7lDpsru3t39s7eez7PM8/uvDPznXdnZ+a8ct7zyswIgiAIgqCY9OrqDARBEARB0DZhqIMgCIKgwIShDoIgCIICE4Y6CIIgCApMGOogCIIgKDBhqIMgCIKgwISh7kZIOkrS6E5qXCLppnrlqacjaXtJX9VB5x5JZ9YjT+2cY7Sko/I8R+ZcIyWZpAGtrQdB0EIY6gbRIAN4ErBihflp68W4N7BNrRlIhQWTdFcr23ZL2zpVmKgnkhaQdIWkDyV9J+m/kk6WNH0NWiZp07LkK4G565DVjYFD6qBTM+0VOiR9JWn7KuQeBAYDH9eYl9audZfTVfmKgk73Jgx1N8LMvjKzml58GY3PzeyzTmblA2A5SXOVpe8Ev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pLf0PgBJB7ug30PStohYBtwfEUi6CThQ3t4NPDOI3rjpG2PMVOMZdaEYuWVkjdjPAcsi4khJd5HFKR6IiDPInOF/Bs6LiFld0Z/Q18Nk3PVnIuISSQfKLH4F8OthNMdJ3xhjphJ7fRci4g1kacdNZKWbY8j9yk2S/h4RqzkUxjMfeLq3NNoF/Wfp80Tg26QH9WuBz2oScdjjpm+MMVNB5w11RBxGevnuALZJWhYRM0mjt4AM1fmGpGfK+YOGMrVav4/+F5OVo9ZIusf6xhgztXRy6TsKAJIOSNpNLnueHhEXKasgfRl4lEyKMbt3bZ/exa3WHwRJ24CX1GXk2q5vjDGTpdMz6ohYSmbm2k7Oql4OfBe4QtKtJZxnnqQ/dVF/gHE0Lptck/SNMWYydGpGHRGLyl5tL1/xF0gjdylwWZldnQvcFBHrJO0fxMi1XX9YesatLiPXdn1jjJkMnTHUEbGQ9Hg+sjSdRha93wnMII0ekn4EnFnaO6NvjDGmmXQijjoijgM2A9+UdEtpfhrYSBq5cyU9FhHnAjMk3V2u6zfjVav1jTHGNJexn1FH5nb+KjnD3B0RS8pbDwL7gduLkTsJuI5MegH07djVan1jjDHNZqydySLiCDJOdiM5I72czNq1iYwxXgucBcwl82JfO0gcbdv1jTHGNJ+xNtQAETFP0q7y7+PICkmHA3coc13PJOON90h6dIg45lbrG2OMaTZjb6h7RMQ0SQcjYgGwhtyf3yLpB9Y3xhjTVMZ+j7qHSvEJZZWk24DDgOURMcf6xhhjmkpnZtQTKTPTnuGzvjHGmEbSWUNtjDHGtIHOLH0bY4wxbcSG2hhjjGkwNtTGGGNMg7GhNsYYYxqMDbUxxhjTYGyojTHGmAZjQ22MMcY0GBtqY4wxpsHYUBtjjDEN5l/ruv5iEXt1jQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 576x288 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(8, 4))\n",
    "gvcomp = plt.pcolormesh(log_mean_grad_vals / log_mean_grad_vals.std(), vmin=-3, vmax=3, cmap=plt.get_cmap(\"RdBu_r\", 12))\n",
    "#plt.quiver(np.ones(30) * 9.5, np.arange(30), log_mean_grad_vals[:, 9], log_mean_grad_vals[:, 12], scale=1.5, headwidth=1, headlength=1)\n",
    "#plt.quiver(np.ones(30) * 10.5, np.arange(30), log_mean_grad_vals[:, 10], log_mean_grad_vals[:, 13], scale=1.5, headwidth=1, headlength=1)\n",
    "#plt.quiver(np.ones(30) * 11.5, np.arange(30), log_mean_grad_vals[:, 11], log_mean_grad_vals[:, 14], scale=1.5)\n",
    "plt.ylabel(\"Model Number\", fontsize=14)\n",
    "plt.gca().set_xticks(np.arange(0.5, 15), minor=True)\n",
    "plt.gca().set_xticks(np.arange(3, 15, 3), minor=False)\n",
    "plt.gca().set_xticklabels([], minor=False)\n",
    "plt.gca().set_xticklabels(all_input_vars, rotation=45, ha=\"right\", minor=True) \n",
    "plt.colorbar(gvcomp, label=\"Normalized Anomaly\")\n",
    "plt.grid(axis='x', color='k', lw=2)\n",
    "plt.title(\"Logistic Mean Optimized Hailstorm Inputs\", fontsize=14)\n",
    "plt.savefig(\"logistic_mean_optimized_hail.pdf\", dpi=300, bbox_inches=\"tight\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([ 29.,   1.,   0.,   6.,  41., 248.,  95.,   0.,   1.,  29.]),\n",
       " array([-0.88712046, -0.72206973, -0.557019  , -0.39196828, -0.22691755,\n",
       "        -0.06186682,  0.10318391,  0.26823464,  0.43328536,  0.59833609,\n",
       "         0.76338682]),\n",
       " <a list of 10 Patch objects>)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0R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=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.hist(log_mean_grad_vals.ravel())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
